home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_09_11 / 9n11109a < prev    next >
Text File  |  1991-09-21  |  438b  |  26 lines

  1. #include <stdio.h>
  2.  
  3. void put(char c, FILE *stream);
  4. void put(const char *s, FILE *stream);
  5.  
  6. class File
  7.         {
  8.         FILE *f;
  9. public:
  10.         File(FILE *ff) : f(ff) { }
  11.         void put(const char *s);
  12.         };
  13.  
  14. void File::put(const char *s)
  15.         {
  16.         put(s, f);          // error
  17.         }
  18.  
  19. int main()
  20.         {
  21.         File f(stdout);
  22.         f.put("hello, world\n");
  23.         return 0;
  24.         }
  25.  
  26.